package com.site.blog.my.core.dao;

import com.site.blog.my.core.entity.AdminUser;
import com.site.blog.my.core.entity.BlogFriends;
import com.site.blog.my.core.entity.BlogTag;
import com.site.blog.my.core.entity.FilePo;
import com.site.blog.my.core.util.PageQueryUtil;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface AdminUserMapper {
    int insert(AdminUser record);

    int insertSelective(AdminUser record);

    /**
     * 登陆方法
     *
     * @param userName
     * @param password
     * @return
     */
    AdminUser login(@Param("userName") String userName, @Param("password") String password);

    AdminUser selectByPrimaryKey(Integer adminUserId);

    int updateByPrimaryKeySelective(AdminUser record);

    int updateByPrimaryKey(AdminUser record);

    List<AdminUser> findUserList(PageQueryUtil pageUtil);

    int getTotalUsers(PageQueryUtil pageUtil);

    void delete(Integer[] ids);

    void insertFile(FilePo filePo);

    List<FilePo> findFileList(PageQueryUtil pageUtil);

    int getFileTotal(PageQueryUtil pageUtil);

    FilePo getFile(Integer id);

    AdminUser findAdminUser(@Param("userName") String userName);

    int saveBlogFriends(BlogFriends blogFriends);

    int getTotalBlogFriends(PageQueryUtil pageUtil);

    List<BlogFriends> findBlogFriendsList(PageQueryUtil pageUtil);

    void deleteBlogFriends(Integer[] ids);
}